home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Updates / HD-Installer / CaptainPlanetHD / Install < prev    next >
Text File  |  2000-05-11  |  3KB  |  159 lines

  1. ;****************************
  2.  
  3. (set #readme-file "README")    ;name of the readme file
  4.  
  5. (procedure P_MakeImages
  6.   (askdisk
  7.     (prompt ("\n\nPlease insert your Captain Planet disk\ninto drive DF%ld:" #CI_drive))
  8.     (dest "CAPTAIN PLANET - BOOTDISK")
  9.     (help @askdisk-help)
  10.   )
  11.   (message "\n\nPress \"Proceed\" to start copying your disk")
  12.  
  13.   (copyfiles (source "readplanetdisk") (dest #dest) (nogauge))
  14.   (if (<> 0 (run ("cd \"%s\"\nreadplanetdisk %ld >ENV:xfail" #dest #CI_drive)))
  15.     (abort (cat
  16.       "Your Captain Planet disk could not be correctly read!\n"
  17.       (getenv "xfail")
  18.     ))
  19.   )
  20.   (delete "ENV:xfail" ("%s/readplanetdisk" #dest) (safe))
  21. )
  22.  
  23. ;****************************
  24. ;----------------------------
  25. ; checks if given program is installed, if not abort install
  26. ; #program - to check
  27.  
  28. (procedure P_ChkRun
  29.   (if
  30.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  31.     ("")
  32.     (abort 
  33.       (cat
  34.     "You must install \"" #program "\" first!\n"
  35.     "It must be accessible via the path.\n"
  36.     "You can find it in the WHDLoad package."
  37.       )
  38.     )
  39.   )
  40. )
  41.  
  42. ;****************************
  43.  
  44. (if (exists #readme-file)
  45.   (if
  46.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  47.     ("")
  48.     (run ("SYS:Utilities/More %s" #readme-file))
  49.   )
  50. )
  51.  
  52. (set #program "WHDLoad")
  53. (P_ChkRun)
  54.  
  55. ; in expert mode ask for source drive
  56. (if (= @user-level 2)
  57.   (set #CI_drive (askchoice
  58.     (prompt "Select source drive for diskimages") (default 0)
  59.     (choices "DF0:" "DF1:" "DF2:" "DF3:")
  60.     (help @askchoice-help)
  61.   ))
  62.   (set #CI_drive 0)
  63. )
  64.  
  65.  
  66. (set @default-dest
  67.   (askdir
  68.     (prompt 
  69.       (cat
  70.     "Where should \"" @app-name "\" installed ?\n"
  71.     "A drawer \"" @app-name "\" will automatically created."
  72.       )
  73.     )
  74.     (help @askdir-help)
  75.     (default @default-dest)
  76.     (disk)
  77.   )
  78. )
  79. (set #dest (tackon @default-dest @app-name))
  80. (if
  81.   (exists #dest)
  82.   (
  83.     (set #choice
  84.       (askbool
  85.         (prompt
  86.           (cat
  87.             "\nDirectory \"" #dest "\" already exists.\n"
  88.             "Should it be deleted?"
  89.           )
  90.         )
  91.         (default 1)
  92.         (choices "Delete" "Skip")
  93.         (help @askbool-help)
  94.       )
  95.     )
  96.     (if
  97.       (= #choice 1)
  98.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  99.     )
  100.   )
  101. )
  102. (makedir #dest
  103.   (help @makedir-help)
  104.   (infos)
  105. )
  106.  
  107. ;----------------------------
  108.  
  109. (copyfiles
  110.   (help @copyfiles-help)
  111.   (source ("%s.Slave" @app-name))
  112.   (dest #dest)
  113. )
  114. (if
  115.   (exists ("%s.newicon" @app-name))
  116.   (set #icon
  117.     (askchoice
  118.       (prompt "\nWhich icon do you like to install ?\n")
  119.       (default 0)
  120.       (choices "Normal" "NewIcon")
  121.       (help @askchoice-help)
  122.     )
  123.   )
  124.   (set #icon 0)
  125. )
  126. (select #icon
  127.   (set #icon ("%s.inf" @app-name))
  128.   (set #icon ("%s.newicon" @app-name))
  129. )
  130. (copyfiles
  131.   (help @copyfiles-help)
  132.   (source #icon)
  133.   (newname ("%s.info" @app-name))
  134.   (dest #dest)
  135. )
  136. (if
  137.   (exists #readme-file)
  138.   (copyfiles
  139.     (help @copyfiles-help)
  140.     (source #readme-file)
  141.     (dest #dest)
  142.   )
  143. )
  144. (if
  145.   (exists ("%s.info" #readme-file))
  146.   (copyfiles
  147.     (help @copyfiles-help)
  148.     (source ("%s.info" #readme-file))
  149.     (dest #dest)
  150.   )
  151. )
  152.  
  153. (P_MakeImages)
  154.  
  155. ;----------------------------
  156.  
  157. (exit)
  158.  
  159.